/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.beautycenter.Funcionalidades.Biometria;

import br.com.beautycenter.bean.Cliente;
import br.com.beautycenter.bean.Digital;
import com.digitalpersona.onetouch.DPFPFingerIndex;
import com.digitalpersona.onetouch.DPFPGlobal;
import com.digitalpersona.onetouch.DPFPTemplate;
import com.digitalpersona.onetouch.verification.DPFPVerification;
import java.util.EnumMap;
import javax.swing.SpinnerNumberModel;

/**
 *
 * @author JoãoVictor
 */
public class VariaveisBiometria {
    
    public static final SpinnerNumberModel maxCount = new SpinnerNumberModel(DPFPFingerIndex.values().length, 0, DPFPFingerIndex.values().length, 1);
    public static final SpinnerNumberModel farRequested = new SpinnerNumberModel(
            DPFPVerification.MEDIUM_SECURITY_FAR, 
            1, 
            DPFPVerification.PROBABILITY_ONE, 100);
    
    private EnumMap<DPFPFingerIndex, DPFPTemplate> templates = new EnumMap<DPFPFingerIndex, DPFPTemplate>(DPFPFingerIndex.class);

    public VariaveisBiometria(Cliente cliente) {
        for(Digital item: cliente.getListaDigitais()){
            templates.put(DPFPFingerIndex.valueOf(item.getDedo()), DPFPGlobal.getTemplateFactory().createTemplate(item.getDigital()));
        }
    }

    public EnumMap<DPFPFingerIndex, DPFPTemplate> getTemplates() {
        return templates;
    }

    public void setTemplates(EnumMap<DPFPFingerIndex, DPFPTemplate> templates) {
        this.templates = templates;
    }
    
    
    
    
    
}
